package com.yunhai.support.config;

import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.profile.DefaultProfile;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.Serializable;

@Data
@Configuration
public class AliVoiceMessageConfig implements Serializable {
    public static final long serialVersionUID = 7736942314547915021L;
    /*** 您的AccessKey ID*/
    public static String accessKeyId="LTAI4Fd51KuU7a69o7trPRhC";
    /*** 您的AccessKey Secret*/
    public static String accessKeySecret="3M9AgooM0xH0RmWOrqggHsKU0nBNFr";
    //region
    public static String regionId = "cn-hangzhou";
    public static String endpoint = "dyvmsapi.aliyuncs.com";
    private String product="Dyvmsapi";
    private String domain="dyvmsapi.aliyuncs.com";

    @Bean
    public IAcsClient iAcsClient() throws ClientException {
        DefaultProfile.addEndpoint( endpoint, regionId, product, domain );
        DefaultProfile profile = DefaultProfile.getProfile(AliVoiceMessageConfig.regionId,
                AliVoiceMessageConfig.accessKeyId,
                AliVoiceMessageConfig.accessKeySecret);



        return new DefaultAcsClient(profile);
    }

//
//    /*** 语音文件的语音ID*/
//    private String ttsCode="TTS_212693864";

//    /*** 主叫号码*/
//    private String calledShowNumber;
//    /*** 相应产品的消息类型*/
//    private String messageType;
//    /*** 在云通信页面开通相应业务消息后，就能在页面上获得对应的queueName*/
//    private String queueName;
}
